﻿using UnityEditor;
using UnityEngine;

namespace Gameplay.PVE.Editor
{
    [CustomEditor( typeof(SectorCreator))]
    public class SectorCreatorEditor : UnityEditor.Editor
    {
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            if (GUILayout.Button("Create"))
            {
                var creator = target as SectorCreator;
                creator.CreateSector(creator.radius,creator.angle);
            }
            if (GUILayout.Button("CreatePizza"))
            {
                var creator = target as SectorCreator;
                creator.CreatePizza(creator.radius,creator.angle,1);
            }
            if (GUILayout.Button("Check"))
            {
                var creator = target as SectorCreator;
                creator.Check();
            }
        }
    }
}